using net_work.Common.Request;
using net_work.Common.Result;
using net_work.Data.DTO.Sys;
using net_work.Data.Entity.Sys;
using net_work.Data.VO.Sys;

namespace net_work.IRepository.Sys;

public interface IDepartmentRepository : IRepository<Department>
{
    /// <summary>
    /// 插入部门
    /// </summary>
    /// <param name="departmentAddRequest">插入部门</param>
    /// <returns>部门ID</returns>
    Task<long> InsertAsync(DepartmentAddRequest departmentAddRequest);

    /// <summary>
    /// 更新部门信息
    /// </summary>
    /// <param name="departmentUpdateRequest">更新部门信息</param>
    /// <returns>是否成功</returns>
    Task<bool> UpdateAsync(DepartmentUpdateRequest departmentUpdateRequest);

    /// <summary>
    /// 获取部门分页信息
    /// </summary>
    /// <param name="request">部门分页请求参数</param>
    /// <returns>部门分页结果</returns>
    Task<PagedResult<DepartmentResult>> GetDepartmentPagedAsync(PagedRequest request);
}